package org.study.collection;

import com.alibaba.fastjson2.JSON;

import java.util.HashMap;
import java.util.Map;

/**
 * 作用描述
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2024年04月16日
 */
public class MapTests {
    public static void main(String[] args) {
        testMap01();
    }

    public static void testMap01() {
        Map<String, Object> cacheData = new HashMap<>() {{
            this.put("a", "a");
            this.put("b", "b1");
        }};
        Map<String, Object> currentData = new HashMap<>() {{
            this.put("b", "b2");
            this.put("c", "c");
        }};
        currentData.putAll(cacheData);
        System.out.println(JSON.toJSONString(currentData));
    }
}
